﻿function selectAll(f, mode) {
    if (mode == true) {
        for (i = 0; i < f.length; i++) {
            if (f.elements[i].type == "checkbox") {
                f.elements[i].checked = true;
            }
        }
    }
    else {
        for (i = 0; i < f.length; i++) {
            if (f.elements[i].type == "checkbox") {
                f.elements[i].checked = false;
            }
        }
    }
}

//CSS背景控制
function overColor(Obj) {
    var elements = Obj.childNodes;
    for (var i = 0; i < elements.length; i++) {
        elements[i].className = "TR_BG"
        Obj.bgColor = ""; //颜色要改
    }

}
function outColor(Obj) {
    var elements = Obj.childNodes;
    for (var i = 0; i < elements.length; i++) {
        elements[i].className = "TR_BG_list";
        Obj.bgColor = "";
    }
}

//CSS背景控制
function useroverColor(Obj) {
    var elements = Obj.childNodes;
    for (var i = 0; i < elements.length; i++) {
        elements[i].className = "bg_over"
        Obj.bgColor = ""; //颜色要改
    }

}
function useroutColor(Obj) {
    var elements = Obj.childNodes;
    for (var i = 0; i < elements.length; i++) {
        elements[i].className = "bg_out";
        Obj.bgColor = "";
    }
}